package com.hgl.servlet.admin;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hgl.entity.Hgl;
import com.hgl.service.HglService;
import com.hgl.service.impl.HglServiceImpl;
import com.hgl.vo.HglVO;


/**<pre>
 * - 
 * ClassName : com.teach.servlet.admin.NewsListServlet
 * Author : J.L.Zhou
 * E-Mail : 2233875735@qq.com
 * Date : 2020年7月24日 下午4:41:44
 * Version : 1.0
 * Copyright 2020 jlzhou.top Inc. All rights reserved. 
 * Warning: this content is only for internal circulation of the company. 
 * It is forbidden to divulge it or use it for other commercial purposes.
 * </pre>
 **/
@WebServlet("/admin/news-list.let")
public class NewsListServlet extends HttpServlet{

	private HglService hglService = new HglServiceImpl();
	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
//		int len=10;
//		try{
//		len=Integer.valueOf(request.getParameter("len"));
//		
//		} catch (Exception ex){
//		
//		}
		List<HglVO> list=hglService.list();
		
		request.setAttribute("list", list);
		request.getRequestDispatcher("/admin/news-list.jsp").forward(request,response);
	}
}
